import React from 'react';

const CommentFilter = (props) => {
  function handleFilterConditionChangeToAll() {
    props.setFilterCondition('ALL');
  }

  function handleFilterConditionChangeToGood() {
    props.setFilterCondition('GOOD');
  }

  function handleFilterConditionChangeToAverage() {
    props.setFilterCondition('AVERAGE');
  }

  function handleFilterConditionChangeToBad() {
    props.setFilterCondition('BAD');
  }
  return (
    <div>
      <input type="button" value="全部" onClick={handleFilterConditionChangeToAll} />
      <input type="button" value="好评" onClick={handleFilterConditionChangeToGood} />
      <input type="button" value="中评" onClick={handleFilterConditionChangeToAverage} />
      <input type="button" value="差评" onClick={handleFilterConditionChangeToBad} />
    </div>
  );
};

export default CommentFilter;
